package com.chhuang.core.exception;

import com.chhuang.core.enums.SaCode;
import lombok.Getter;

/**
 * @ClassName SaException
 * @Description 自定义业务异常类
 * @Author Darren Huang
 * @Date 2022/11/25 22:59
 * @Version 1.0
 */
@Getter
public class SaException extends RuntimeException {
    private static final long serialVersionUID = -7490078539792563726L;

    private SaCode saCode;

    public SaException(SaCode saCode){
        super(saCode.getMessage());
        this.saCode = saCode;
    }

    public SaException(String message) {
        super(message);
    }

}
